package com.itheima.homework2;

public class MoTuo extends Car implements GPS{
    public MoTuo(String bread, int price) {
        super(bread, price);
    }

    @Override
    public void run() {
        System.out.println(super.getBread()+"摩托车价值"+super.getPrice());
    }

    @Override
    public void gps(Car car) {
        if(car.getBread().equals("宝马")){
            System.out.println("宝马有GPS");
        }else {
            System.out.println(car.getBread()+"没有GPS");
        }
    }
}
